#include <string>
#include <stack>

class expressionSymbol
{
public:
    expressionSymbol();
    expressionSymbol(char ch);

    friend bool operator>=(const expressionSymbol& left, const expressionSymbol& right);

    char getOp() const {return op;}

private:
    char op;
    int inputPrecedence;
    int stackprecedence;
};

class infix2Postfix
{
public:
    infix2Postfix();
    infix2Postfix(const std::string& infixExp);

    void setInfixExp(const std::string& infixExp);
    std::string postfix();

private:
    std::string infixExpression;
    std::string postfixExpression;
    std::stack<expressionSymbol> operatorStack;

    void outputHigherOrEqual(const expressionSymbol& op);
    bool isOperator(char ch) const;

};